package dice.sinanya.entity;

import org.nlpcn.commons.lang.util.StringUtil;

import java.sql.Timestamp;
import java.util.ArrayList;

public class EntityCustomSearch {
    Timestamp inputDate;
    String authorId;
    String authorNick;
    String key;
    String messages;

    public EntityCustomSearch() {
    }

    public Timestamp getInputDate() {
        return inputDate;
    }

    public void setInputDate(Timestamp inputDate) {
        this.inputDate = inputDate;
    }

    public String getAuthorId() {
        return authorId;
    }

    public void setAuthorId(String authorId) {
        this.authorId = authorId;
    }

    public String getAuthorNick() {
        return authorNick;
    }

    public void setAuthorNick(String authorNick) {
        this.authorNick = authorNick;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getMessages() {
        return messages;
    }

    public void setMessages(String messages) {
        this.messages = messages;
    }

    public String build() {
        ArrayList<String> list = new ArrayList<>();
        list.add("关键字:\t" + key + "\t包含以下自定义录入条目");
        list.add("录入人:\t" + authorId + "\t(" + authorNick + ")");
        list.add("录入时间:\t" + inputDate);
        list.add("内容:\n" + messages);
        return StringUtil.joiner(list, "\n");
    }
}
